import React from 'react';

import './index.css'

const MySwitchText = (props) => {

  const { checkedText=null, unCheckedText=null, _value } = props;

  if (checkedText === null && unCheckedText === null) {
    return null;
  }

  return (
    <span className="_text">
      { (_value && checkedText !== null) && checkedText }
      { (!_value && unCheckedText !== null) && unCheckedText }
    </span>
  )
}

export default MySwitchText;